import React, { useEffect, useState } from 'react';
import { Descriptions } from 'antd';
import { getBaseInformation } from '@/services/userManagement';
import style from './index.less';

interface IProps {
  userId: string;
}

const BasicInformation: React.FC<IProps> = (props) => {
  const [basicInformationData, setBasicInformationData] = useState('');

  const { userId } = props;

  useEffect(() => {
    if (userId) {
      getBaseInformation().then(({ data }) => {
        const baseData = data[0];
        setBasicInformationData(baseData);
      });
    }
  }, [userId]);

  return (
    <Descriptions
      bordered
      size="small"
      // labelStyle={{ justifyContent: 'flex-end', width: '200px' }}
      column={{ xxl: 4, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }}
    >
      <Descriptions.Item label="归属区域机构">
        {basicInformationData?.name}
      </Descriptions.Item>
      <Descriptions.Item label="归属合作方"></Descriptions.Item>
      <Descriptions.Item label="拓展机构"></Descriptions.Item>
      <Descriptions.Item label="地区	"></Descriptions.Item>
      <Descriptions.Item label="客户类型">$20.00</Descriptions.Item>
      <Descriptions.Item label="所属集团">$60.00</Descriptions.Item>
      <Descriptions.Item label="上级商户"></Descriptions.Item>
      <Descriptions.Item label="客户中文名称">
        {basicInformationData?.tuozhan}
      </Descriptions.Item>
      <Descriptions.Item label="客户中文简称"></Descriptions.Item>
      <Descriptions.Item label="客户英文名称	"></Descriptions.Item>
      <Descriptions.Item label="客户英文简称"></Descriptions.Item>
      <Descriptions.Item label="客户状态"></Descriptions.Item>
      <Descriptions.Item label="创建时间"></Descriptions.Item>
      <Descriptions.Item label="支付服务协议号码	"></Descriptions.Item>
      <Descriptions.Item label="支付服务协议有效期	"></Descriptions.Item>
      <Descriptions.Item label="BR商业登记证号码	"></Descriptions.Item>
      <Descriptions.Item label="BR商业登记证有效期"></Descriptions.Item>
      <Descriptions.Item label="CR注册登记证号码"></Descriptions.Item>
      <Descriptions.Item label="经营年限"></Descriptions.Item>
      <Descriptions.Item label="法律地位"></Descriptions.Item>
      <Descriptions.Item label="小微商户"></Descriptions.Item>
      <Descriptions.Item label="行业类型"></Descriptions.Item>
      <Descriptions.Item label="业务地址(中)"></Descriptions.Item>
      <Descriptions.Item label="业务地址(英)"></Descriptions.Item>
      <Descriptions.Item label="商户网站地址"></Descriptions.Item>
      <Descriptions.Item label="拥有人/董事姓名(中)	"></Descriptions.Item>
      <Descriptions.Item label="拥有人/董事姓名(英)"></Descriptions.Item>
      <Descriptions.Item label="法人代表证件类型"></Descriptions.Item>
      <Descriptions.Item label="拥有人/董事身份证件号码"></Descriptions.Item>
      <Descriptions.Item label="客户联系人">
        {basicInformationData?.invoiceType}
      </Descriptions.Item>
      <Descriptions.Item label="联系电话"></Descriptions.Item>
      <Descriptions.Item label="联系邮箱"></Descriptions.Item>
      <Descriptions.Item label="总体评价"></Descriptions.Item>
      <Descriptions.Item label="拓展单位"></Descriptions.Item>
      <Descriptions.Item label="考察日期"></Descriptions.Item>
      <Descriptions.Item label="拓展人"></Descriptions.Item>
      <Descriptions.Item label="拓展人邮箱"></Descriptions.Item>
      <Descriptions.Item label="风控等级"></Descriptions.Item>
      <Descriptions.Item label="NAR1有效期"></Descriptions.Item>
      <Descriptions.Item label="上级商户"></Descriptions.Item>
      <Descriptions.Item label="备注"></Descriptions.Item>
    </Descriptions>
  );
};

export default BasicInformation;
